package com.example.demo.mybatis.domain;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.Email;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel(description="用户实体")
public class TUser implements Serializable {
    @ApiModelProperty(value = "用户编号", position = 1)  //position定义的成员变量顺序来展现
    private Long id;

    @NotNull
    @ApiModelProperty(value = "用户名称", position = 2)
    private String name;

    @Max(100)
    @Min(10)
    @ApiModelProperty(value = "用户年龄", position = 3)
    private Integer age;

    @Email
    @ApiModelProperty(value = "用户电子邮箱", position = 4)
    private String email;

//    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "用户创建时间", position = 5)
    private Date ctime;

    //@TableLogic //逻辑删除标识
    @JsonIgnore
    @ApiModelProperty(hidden = true)
    private Integer deleted;
}